package net.hn.hnms.config;

import java.util.concurrent.ScheduledFuture;

/**
 * 智呈物联 pan'sx
 * 2023/10/23 9:38
 * 1.0 version
 */
public class ScheduledTask {

    volatile ScheduledFuture<?> future;

    /**
     * 取消定时任务
     */
    public void cancel() {
        ScheduledFuture<?> future = this.future;
        if(future != null) {
            future.cancel(true);
        }
    }
}

